package grape.composite.rest.client.impl.activity;

import grape.composite.rest.client.activity.ActivityClient;
import grape.composite.rest.activity.mvc.ActivityInnerController;
import grape.composite.service.activity.api.IActivityService;
import grape.composite.service.activity.po.Activity;
import grape.composite.rest.client.activity.ActivityClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by yangwei
 * Created at 2020/5/8 17:44
 */
@Component
public class ActivityClientImpl implements ActivityClient {


    @Autowired
    private ActivityInnerController activityInnerController;
    @Autowired
    private IActivityService iActivityService;

    @Override
    public String trans(String type, String key) {
        return iActivityService.trans(type,key);
    }

    @Override
    public boolean support(String type) {
        return iActivityService.support(type);
    }

    @Override
    public Activity getActivityById(String id) {
        return activityInnerController.getActivityById(id);
    }

    @Override
    public Activity getActivityByCode(String code) {
        return activityInnerController.getActivityByCode(code);
    }
}
